<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>First_Listener</title>
    <script src="../Vue.js" type="text/javascript"></script>
</head>
<body>
    <div id="app">
        <h1>{{username}}</h1>
    </div>

    <script>
        var app = new Vue({
            el:"#app",
            data:{
            	username:"张三"
            },
            watch:{
            	username:function (val) {
                    this.username2 = val
	            }
            }
        })
    </script>
</body>
</html>